home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / dev / amos / amoslist.lzh / AMOSLIST / 000127_amos-request@svcs1.digex.net_Thu Jan 23 18:32:19 1997.msg < prev    next >
Internet Message Format  |  1997-02-02  |  3KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  2.     by mail2.access.digex.net (8.8.5/8.8.5) with ESMTP id SAA07119
  3.     for <mcox@access.digex.net>; Thu, 23 Jan 1997 18:32:17 -0500 (EST)
  4. Received: (from daemon@localhost)
  5.     by svcs1.digex.net (8.8.5/8.8.5) id OAA28365
  6.     for amos-out; Thu, 23 Jan 1997 14:39:36 -0500 (EST)
  7. Received: from mail2.access.digex.net (mail2.access.digex.net [205.197.247.3])
  8.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id OAA28360
  9.     for <amos-list@svcs1.digex.net>; Thu, 23 Jan 1997 14:39:35 -0500 (EST)
  10. Received: from uno.canit.se (root@uno.canit.se [193.13.228.1])
  11.     by mail2.access.digex.net (8.8.5/8.8.5) with SMTP id OAA17051
  12.     for <amos-list@access.digex.net>; Thu, 23 Jan 1997 14:39:34 -0500 (EST)
  13. Received: (from uucp@localhost) by uno.canit.se (8.6.10/8.6.10) with UUCP id UAA30115 for access.digex.net!amos-list; Thu, 23 Jan 1997 20:38:41 +0100
  14. Received: by karkis.canit.se (V1.17-beta/Amiga)
  15.       id <0tj6@karkis.canit.se>; Thu, 23 Jan 97 17:05:39 CET
  16. Message-ID: <32e79a5c@karkis.canit.se>
  17. Date: 23 Jan 97 17:05:32 CET
  18. Organization: Karkis BBS, Stockholm, Sweden
  19. X-Mailer: AmiGate 1.6a (22.12.95)
  20. From: grok@karkis.canit.se (Hakan Venderlof)
  21. To: amos-list@access.digex.net
  22. Subject: goto
  23. Status: RO
  24. X-Status: 
  25.  
  26. About this again:
  27.  
  28. Do
  29.  
  30. Goto Rnd(4)
  31.  
  32. 0
  33. <bla>
  34. 1
  35. <bla>
  36. 2
  37. <bla>
  38. 3
  39. <bla>
  40. 4
  41. <bla>
  42. Loop
  43.  
  44.  
  45. I want a prog that randomly goes to the code after each label exactly once. It
  46. MUST go there once but may never return there. 
  47. This code achives that:
  48.  
  49. A=1 : B=1 : C=1 : D=1 : E=1
  50.  
  51. Do 
  52.  
  53. _START:
  54.  
  55. Wait 5
  56. X=Rnd(4)
  57. Goto(X)
  58.  
  59. 0
  60. If A<2 Then Locate 1,1 : Print "1" : Inc A : Goto _START 1
  61. If B<2 Then Locate 1,2 : Print "2" : Inc B : Goto _START 2
  62. If C<2 Then Locate 1,3 : Print "3" : Inc C : Goto _START 3
  63. If D<2 Then Locate 1,4 : Print "4" : Inc D : Goto _START 4
  64. If E<2 Then Locate 1,5 : Print "5" : Inc E : Goto _START Loop 
  65.  
  66.  
  67.  
  68.  
  69. The problem with this code is that there's gonna be a lot of writing if you
  70. have hundereds of labels...
  71.  
  72. ...and mostly that the more
  73. labels that are 'checked' the more the program slows down since it has to
  74. return to labels that already have been visited just to check that it has been
  75. there....
  76.  
  77.  
  78. So what I'd like to see is a prog that makes the selection in the top of the
  79. loop and only goes once to each label.
  80.  
  81. I did get an answer before in a swedish BBS but I lost the code when parts of
  82. my HD was destroyed. I'm more careful with backups now... 
  83. Maybe it could be possible to use 'Sort', I don't know. That could be an idea
  84. to 'scramble' a number of labels and get a list of labels and then read that
  85. list in order one time.... ..just don't know how to programme it...
  86.  
  87.  
  88.  
  89. _______________________________________
  90. |                                     |
  91. | greets..............................|
  92. |                                     |
  93. | grok@karkis.canit.se  +46+08+7529323|
  94. |_____________________________________|
  95.  
  96.  
  97.  
  98.  
  99.